#include <string>
#include <iostream>

#include "Cache.h"
#include "Configuration.h"
#include "Parser.h"
#include "Simulator.h"

int main(int argc, const char* argv[])
{

#ifdef DEBUG
	std::cout << "DEBUG OUTPUT ENABLED" << std::endl;
#endif
	
	{
		Configuration config(
			Configuration::Associativity::DIRECT_MAPPED,
			128, 32, 64);
		
		Simulator sim(config, config, "trace-ex1.txt");
		sim.run();

		sim.printResults();
	}

	{
		Configuration config(
		Configuration::Associativity::SET_ASSOCIATIVE,
		1024, 64, 64, 2);
	
		Simulator sim(config, config, "trace-ex2.txt");
		sim.run();

		sim.printResults();
	}
	
	
	{
		Configuration config(
		Configuration::Associativity::SET_ASSOCIATIVE,
		2048, 64, 64, 4);
	
		Simulator sim(config, config, "trace-ex3.txt");
		sim.run();

		sim.printResults();
	}

	{
		Configuration config(
		Configuration::Associativity::SET_ASSOCIATIVE,
		2048, 64, 64, 2);
	
		Simulator sim(config, config, "trace-ls.txt");
		sim.run();

		sim.printResults();
	}

	return 0;
}